<?php

/**
 * 热门小区
 */

namespace app\api\model;


use PDOStatement;
use think\Collection;
use think\Db;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\exception\DbException;
use think\Model;

class HotVallige extends Model {

    /**
     * 热门搜索
     * @param $params
     * @return array|PDOStatement|string|Collection
     * @throws DataNotFoundException
     * @throws ModelNotFoundException
     * @throws DbException
     */
    public function getHotSearch($params,$city_code) {
        return db("hot_vallige")
            ->alias('ht')
            ->join("house_village hv","hv.id = ht.village_id")
            ->field('hv.name')
            ->where("ht.city_code={$city_code}")
            ->select();
    }

}
